#-------------------------------------------------------------------
# This file is part of the CMake build system for ogre-url
#-------------------------------------------------------------------

project (Plugin_OgreURL)

# define header files for the library
set (HEADER_FILES
	include/OgreURLPlugin.h
	include/OgrePluginURLPrerequisites.h
)

# define source files for the library
set (SOURCE_FILES
	src/OgreURLPlugin.cpp
	src/OgreURLPluginDll.cpp
)

# setup project include directory
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)

# setup dependency directories 
include_directories (${CMAKE_HOME_DIRECTORY}/OgreURL/include)

# build folder
include_directories (${CMAKE_BINARY_DIR}/include/)

# boost
if (BOOST_IS_REQUIRED)
	include_directories (${Boost_INCLUDE_DIRS})
endif (BOOST_IS_REQUIRED)
# ogre
include_directories (${OGRE_INCLUDE_DIRS})
include_directories (${OGRE_CONFIG_INCLUDE_DIRS})

# setup link directories 
# boost
if (BOOST_IS_REQUIRED)
	link_directories (${Boost_LIBRARY_DIRS})
endif (BOOST_IS_REQUIRED)

# setup Plugin_OgreURL target
add_library (Plugin_OgreURL SHARED ${HEADER_FILES} ${SOURCE_FILES})

# setup link libraries
target_link_libraries (Plugin_OgreURL OgreURL ${OGRE_LIBRARIES})
# boost
if (BOOST_IS_REQUIRED)
	target_link_libraries (Plugin_OgreURL ${Boost_THREAD_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
endif (BOOST_IS_REQUIRED)


# setup project dependencies
add_dependencies(Plugin_OgreURL OgreURL)
